package com.accloud.cloudservice;

import org.json.JSONException;

class ACTaskEvent extends ACEvent {
    static final String CREATE = "create";
    static final String DELETE = "delete";
    static final String DEVICE = "device";
    static final String GROUP = "group";
    static final String MODIFY = "modify";
    static final String SINGLE = "single";
    static final String START = "start";
    static final String STOP = "stop";
    static final String UDS = "uds";

    ACTaskEvent(String eventName, String taskId, String dest, String taskName, String taskType) {
        super("apm_app_task", eventName, null);
        try {
            this.data.put("dest", dest);
            if (taskId != null) {
                this.data.put("task_id", taskId);
            }
            if (taskName != null) {
                this.data.put("task_name", taskName);
            }
            this.data.put("task_type", taskType);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}
